<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="Mosaddek">
    <meta name="keyword" content="FlatLab, Dashboard, Bootstrap, Admin, Template, Theme, Responsive, Fluid, Retina">
    <link rel="shortcut icon" href="{{ URL::asset('/') }}/assets/towers/img/favicon.html">

    <title>反馈列表</title>

    <!-- Bootstrap core CSS -->
    <link href="{{ URL::asset('/') }}/assets/towers/css/bootstrap.min.css" rel="stylesheet">
    <link href="{{ URL::asset('/') }}/assets/towers/css/bootstrap-reset.css" rel="stylesheet">
    <!--external css-->
    <link href="{{ URL::asset('/') }}/assets/towers/assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
    <!-- Custom styles for this template -->
    <link href="{{ URL::asset('/') }}/assets/towers/css/style.css" rel="stylesheet">
    <link href="{{ URL::asset('/') }}/assets/towers/css/style-responsive.css" rel="stylesheet" />

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 tooltipss and media queries -->
    <!--[if lt IE 9]>
      <script src="{{ URL::asset('/') }}/assets/towers/js/html5shiv.js"></script>
      <script src="{{ URL::asset('/') }}/assets/towers/js/respond.min.js"></script>
    <![endif]-->

      <style>

          fieldset {
              border: 0;
              background: beige;
              border-style: solid;
              border-width: 2px;
              -moz-border-radius: 5px;
              -webkit-border-radius: 5px;
              -khtml-border-radius: 5px;
              border-radius: 5px;
              border-color: #000a628f;
              padding: 5px 10px;
              margin-bottom: 2px;
          }

          fieldset legend {
              color:#302A2A;
              font: bold 16px/2 Verdana, Geneva, sans-serif;
              font-weight: bold;
              text-align: left;
              border: 0;
              text-shadow: 2px 2px 2px rgb(88, 126, 156);
          }
      </style>
  </head>

  <body>

  <section id="container" class="">
      <!--header start-->
      <header class="header white-bg">
          <div class="sidebar-toggle-box">
              <div data-original-title="Toggle Navigation" data-placement="right" class="icon-reorder tooltips"></div>
          </div>
          <!--logo start-->
          <a href="#" class="logo">AlphaGo<span>反馈答复系统</span></a>
          <!--logo end-->


      </header>
      <!--header end-->
      <!--sidebar start-->
      <aside>
          <div id="sidebar"  class="nav-collapse ">
              <!-- sidebar menu start-->
              <ul class="sidebar-menu">

                  <li class="active">
                      <a class="" href="ticket_mgmr.html?sid={{$sid}}">
                          <i class="icon-tasks"></i>
                          <span>反馈管理</span>
                      </a>
                  </li>

              </ul>
              <!-- sidebar menu end-->
          </div>
      </aside>
      <!--sidebar end-->
      <!--main content start-->
      <section id="main-content">
          <section class="wrapper">
              <!-- page start-->
              <div class="row">
                  <div class="col-lg-12">

                      <form method="get" action="export" >
                          <fieldset>
                              <legend>导出excel</legend>

                              类型：
                              <select name="type" style="width: 100px">
                                  <option value="1">全部</option>
                                  <option value="吐槽类">吐槽类</option>
                                  <option value="意见类">意见类</option>
                                  <option value="诉求类">诉求类</option>
                                  <option value="建议类">建议类</option>
                              </select> &nbsp;&nbsp;&nbsp;&nbsp;
                              部门：
                              <select name="department" style="width: 100px">
                                  <option value="1">全部</option>
                                  <option value="公司领导">公司领导</option>
                                  <option value="市场部">市场部</option>
                                  <option value="业务拓展部">业务拓展部</option>
                                  <option value="建设部">建设部</option>
                                  <option value="维护部">维护部</option>
                                  <option value="物业中心">物业中心</option>
                                  <option value="财务部">财务部</option>
                                  <option value="综合部">综合部</option>
                              </select> &nbsp;&nbsp;&nbsp;&nbsp;
                              <button type="submit" value="导出" >导出</button>
                          </fieldset>
                      </form>

                      <form method="post" action="import" enctype="multipart/form-data">
                          <fieldset>
                              <legend>导入excel</legend>

                              <label>选择文件：</label>
                              <input id="filetxt" type="text" value="请选择文件" />
                              <input id="filebtn" type="button" value="选择文件"/>
                              <input id='file' name='file' type="file" style="display: none" />
                              <button type="submit" value="提交" >提交</button>
                          </fieldset>
                      </form>

                      <section class="panel" style="margin-top: 10px">




                          <table class="table table-striped border-top" id="sample_1">
                          <thead>
                          <tr>
                              <th>时间</th>
                              <th class="hidden-phone">内容</th>
                              <th class="hidden-phone">回复</th>
                              <th class="hidden-phone">部门</th>
                              <th class="hidden-phone">类型</th>
                              <th class="hidden-phone">其他信息</th>
                              <th class="hidden-phone">操作</th>
                          </tr>
                          </thead>
                          <tbody>
                          @foreach ($tickets as $t)
                              <tr class="odd" style="cursor:pointer;" >
                                  <td>{{$t['gmt_create']}}</td>
                                  <td> {{$t['topic']}} : <br/> {{$t['content']}}</td>
                                  <td>{{$t['reply']}}</td>
                                  <td>{{$t['department']}}</td>
                                  <td>
                                      {{$t['type']}}
                                  </td>
                                  <td>
                                      {{$t['anonymous']}} <br>
                                      {{$t['phone']}} <br>
                                      {{$t['contactor']}} <br>
                                  </td>
                                  <td>
                                      <a target="_blank" href="add_reply.html?id={{$t['id']}}">
                                          <button type="button" class="btn btn-danger">回复</button>
                                      </a>
                                      {{--<button type="button" class="btn btn-danger" onclick="openReply('{{$t['id']}}');">回复</button>--}}
                                      {{--<button type="button" class="btn btn-danger" onclick="openPhoto('{{$t['id']}}');">查看回复</button>--}}
                                  </td>
                              </tr>
                          @endforeach
                          </tbody>
                          </table>
                      </section>
                  </div>
              </div>
              <!-- page end-->
          </section>
      </section>
      <!--main content end-->
  </section>

    <!-- js placed at the end of the document so the pages load faster -->
    <script src="{{ URL::asset('/') }}/assets/towers/js/jquery.js"></script>
    <script src="{{ URL::asset('/') }}/assets/towers/js/bootstrap.min.js"></script>
    <script src="{{ URL::asset('/') }}/assets/towers/js/jquery.scrollTo.min.js"></script>
    <script src="{{ URL::asset('/') }}/assets/towers/js/jquery.nicescroll.js" type="text/javascript"></script>
    {{--<script type="text/javascript" src="{{ URL::asset('/') }}/assets/towers/assets/data-tables/jquery.dataTables.js"></script>--}}
    {{--<script type="text/javascript" src="{{ URL::asset('/') }}/assets/towers/assets/data-tables/DT_bootstrap.js"></script>--}}
  <script type="text/javascript" src="{{ URL::asset('/') }}/assets/towers/js/dynamic-table.js"></script>


    <!--common script for all pages-->
    <script src="{{ URL::asset('/') }}/assets/towers/js/common-scripts.js"></script>

    <!--script for this page only-->
    <script src="{{ URL::asset('/') }}/assets/towers/js/dynamic-table.js"></script>

  <script src="{{ URL::asset('/') }}/assets/towers/layer/layer.js"></script>
  <script src="{{ URL::asset('/') }}/assets/towers/layer/extend/layer.ext.js"></script>

  <script>

      $(document).ready(function(){
          $(function(){
              $('#file').change(function(){
                  path = $('#file').val();
                  $('#filetxt').val(getFileName(path));
              });

              $('#filebtn').click(function(){
                  $('#file').trigger('click');
              });
          });
      });

      function openPhoto(taskId){
            layer.open({
              type: 2,
              title: "详情-" + taskId,
              area: ['630px', '560px'],
              shade: 0.8,
              closeBtn: true,
              shadeClose: true,
              content: 'ticket_info.html?id=' + taskId //http://player.youku.com/embed/XMjY3MzgzODg0
          });
        }

      function openReply(taskId){
          layer.open({
              type: 2,
              title: "回复-" + taskId,
              area: ['630px', '560px'],
              shade: 0.8,
              closeBtn: true,
              shadeClose: true,
              content: 'add_reply.html?id=' + taskId //http://player.youku.com/embed/XMjY3MzgzODg0
          });
      }

      function getFileName(o){
          var pos=o.lastIndexOf("\\");
          return o.substring(pos+1);
      }

  </script>
  </body>
</html>
